import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store/index';
import MainApi from './service/main/MainApi';
import ElementUI from 'element-ui';
import enlocale from 'element-ui/lib/locale/lang/en';
import 'element-ui/lib/theme-chalk/index.css';
import i18n from '@/lang'
import '@/styles/index.scss'
import "./router/permission";
import "@/iconfont/iconfont.css";
import Config from './Config';

// @ts-ignore
import ECharts from 'vue-echarts'
import 'echarts/lib/chart/line'
import 'echarts/lib/chart/bar'
import 'echarts/lib/chart/pie'
import 'echarts/lib/chart/map'
import 'echarts/lib/chart/effectScatter'
import 'echarts/lib/component/polar'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/title'
import 'echarts/lib/component/legend'
import 'echarts/lib/component/grid'
import 'echarts/lib/component/geo'
import 'echarts/map/js/china'
import 'echarts-gl'
Vue.component('v-chart', ECharts)

// @ts-ignore
import VueParticles from 'vue-particles'
Vue.use(VueParticles)


Vue.use(ElementUI, {
  size: "small", // Set element-ui default size
  i18n: (key: string, value: string) => i18n.t(key, value)
});

Vue.config.productionTip = false
Vue.prototype.$mainApi = new MainApi();
Vue.prototype.$config = new Config();

Vue.use(ElementUI, { enlocale })

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
